package com.jk.service;


import com.jk.entity.Company;
import com.jk.entity.CompanyRecord;
import com.jk.entity.Transaction;
import com.jk.entity.TransferRecord;
import com.jk.mapper.CompanyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("companyService")
public class CompanyServiceImpl implements CompanyService{

    @Autowired
    private CompanyMapper companyMapper;
    /**
     * 查询公司
     * */
    public List<Company> queryCompany(String userId){
        return  companyMapper.queryCompany(userId);
    }

    public void  addCompany(Company company){
       companyMapper.addCompany(company);
   }

    public boolean deleteCompany(String companyId){
     return  companyMapper.deleteCompany(companyId);
   }
    /**
     * 查询交易记录
     * */
    public List<CompanyRecord> selectJyjl(String userId) {
        return companyMapper.selectJyjl(userId);
    }

    public Long selectSpye(String userId) {
        return companyMapper.selectSpye(userId);
    }


}
